package no.uio.ifi.cop.cl;

import java.util.ArrayList;
import java.util.Iterator;

/**
 * A Theory holds a list of Axioms.
 *
 * @version 1.0
 * @author bjarneh@ifi.uio.no
 */


public class Theory implements Iterable<Axiom>{


    ArrayList<Axiom> axioms;

    public Theory(){
        axioms = new ArrayList<Axiom>(20);
    }

    public void add(Axiom ax){
        axioms.add(ax);
    }

    public String toString(){

        StringBuilder sb = new StringBuilder();

        for(Axiom a : axioms){
            sb.append( String.format("%s\n",a) );
        }

        return sb.toString();
    }

    public Iterator<Axiom> iterator(){
        return axioms.iterator();
    }

}
